<?php

use EasySwoole\Log\LoggerInterface;

return [
    'SERVER_NAME' => "EasySwoole",
    'ENV'         => 'produce',  //生产环境
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT'           => 9502,
        'SERVER_TYPE'    => EASYSWOOLE_WEB_SERVER,
        //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER
        'SOCK_TYPE'      => SWOOLE_TCP,
        'RUN_MODEL'      => SWOOLE_PROCESS,
        'SETTING'        => [
            'worker_num'         => 4,
            'reload_async'       => true,
            'max_wait_time'      => 3,
            'package_max_length' => 1024 * 1024 * 1024, //1024M
        ],
        'TASK'           => [
            'workerNum'     => 4,
            'maxRunningNum' => 128,
            'timeout'       => 15
        ]
    ],
    "LOG"         => [
        // 设置记录日志文件时日志文件存放目录
        'dir'            => null,
        // 设置记录日志时的日志最低等级，低于此等级的日志不进行记录和显示
        'level'          => LoggerInterface::LOG_LEVEL_DEBUG,
        // 设置日志处理器 `handler` (handler)
        'handler'        => new \App\Core\Logger(),
        // 设置开启在记录日志到日志文件时在控制台打印日志
        'logConsole'     => true,
        // 设置开启在控制台显示日志
        'displayConsole' => true,
        // 设置打印日志时忽略哪些分类的日志不进行记录
        'ignoreCategory' => []
    ],
    'TEMP_DIR'    => '/tmp',
    'DEBUG'       => false,
    'MYSQL_READ'  => [
        'host'              => '38.47.239.250',
        'port'              => '3306',
        'user'              => 'pai_user',
        'timeout'           => '5',
        'charset'           => 'utf8mb4',
        'password'          => 'b6XxBrgIYOtB1',
        'database'          => 'baiyi',
        'ObjectTimeout'     => '0.1',
        'IntervalCheckTime' => 30 * 1000,
        'MaxIdleTime'       => 15,
        'AutoPing'          => 5,
        'MinObjectNum'      => 1,
        'MaxObjectNum'      => 10,
        'returnCollection'  => true,
    ],
    'MYSQL_WRITE' => [
        'host'              => '38.47.239.250',
        'port'              => '3306',
        'user'              => 'pai_user',
        'timeout'           => '5',
        'charset'           => 'utf8mb4',
        'password'          => 'b6XxBrgIYOtB1',
        'database'          => 'baiyi',
        'ObjectTimeout'     => '0.1',
        'IntervalCheckTime' => 30 * 1000,
        'MaxIdleTime'       => 15,
        'AutoPing'          => 5,
        'MinObjectNum'      => 1,
        'MaxObjectNum'      => 10,
        'returnCollection'  => true,
    ],
    /*################ REDIS CONFIG ##################*/
    'REDIS'       => [
        'host'      => '127.0.0.1',//'redis',//39.96.20.142
        'port'      => '6379',//6379
        'auth'      => 'PHm6]20z5fHRW#7#00',
        'db'        => 3,
        'serialize' => \EasySwoole\Redis\Config\RedisConfig::SERIALIZE_NONE
    ],
    /*################ MONGODB CONFIG ##################*/
    'MONGODB' => [
        'hostname' => '127.0.0.1',//'mongodb',
        'port'     => '27017',//'',
        'username' => 'baiyi_user',
        'password' => 'xcA9sBE*!pM.kQ8B',
        'database' => 'baiyi'
    ],
    //域名
    'HOST'        => 'http://www.pai2.net/',

];

